<template>
  <middle-area-two>
    <div slot="middle-left-top" class="left-top">
      <ul>
        <li><a href="#"><h3 >综艺</h3></a></li>
        <li><a href="#"><p>青春有你第3季</p></a></li>
        <li><div></div></li>
        <li><a href="#"><p>奇葩说第7季</p></a></li>
        <li><div></div></li>
        <li><a href="#"><p>戏剧新时代</p></a></li>
        <li><div></div></li>
        <li><a href="#"><p>欢乐喜剧人第7季</p></a></li>
        <li><div></div></li>
        <li><a href="#"><p>2021牛年春晚</p></a></li>
        <li><div></div></li>
        <li><a href="#"><p>更多>></p></a></li>
      </ul>
      
    </div>
    <div slot="middle-left-bot" class="middle-left-bot">
      <div class="bot-left">
        <!---------轮播区-----------  -->
        <div id="carouselExampleFade" class="carousel slide carousel-fade" data-ride="carousel">
          <div class="carousel-inner aaa">
            <div class="carousel-item active">
              <img src="../../../assets/img/02.jpg" class="d-block w-100" alt="...">
            </div>
            <div class="carousel-item">
              <img src="https://picsum.photos/1024/480/?image=58" class="d-block w-100" alt="...">
            </div>
            <div class="carousel-item">
              <img src="https://picsum.photos/1024/480/?image=54" class="d-block w-100" alt="...">
            </div>
          </div>
          <a class="carousel-control-prev" href="#carouselExampleFade" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
          </a>
          <a class="carousel-control-next" href="#carouselExampleFade" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
          </a>
        </div>
        <!-- -------列表区---------- -->
      </div>
      <div class="bot-right">
        <ul class="ul ">
          <li v-for="item,index in datalist" :key="index">
            <div class="middle-img">
              <img :src="item.imgUrl" alt="">
              <a href="#"><h5>{{item.name}}</h5></a>
              <p>{{item.director}}</p>
            </div>
          </li>
        </ul >
        <ul class="ul lu2">
          <li v-for="item,index in datalist" :key="index">
            <div class="middle-img">
              <img :src="item.imgUrl" alt="">
              <a href="#"><h5>{{item.name}}</h5></a>
              <p>{{item.director}}</p>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <div slot="middle-right-top" class="right-top">
      <router-link to="/home/carshow"><h3>热播榜</h3></router-link>
      <router-link to="/home/carshow1"><h3>飙升榜</h3></router-link>
      <div class="right-top-tit3"><a href="#"><h5>更多>></h5></a></div>
    </div>
    <div slot="middle-right-bot">         
      <router-view></router-view> 
    </div>
  </middle-area-two>
</template>

<script>
import {getMovieList} from '@/api/movie'
import MiddleAreaTwo from './MiddleAreaTwo'
export default {
  name:'MiddleAreaTwoItem',
  components:{
    MiddleAreaTwo,
  },
  data(){
    return{
      datalist:[]
    }
  },
  created(){
    getMovieList({}).then(res=>{
      let data = res.data
      this.datalist = data.data.list.slice(0,3)
    })
  }
}
</script>

<style scoped>
  .left-top{
    display: flex;
    justify-content: space-between;
  }
  .left-top ul{
    width: 80%;
    /* width: 165px; */
    margin-left: 10px;
    display: flex;
    justify-content: space-evenly;
  }
  .left-top ul h3{
    color: #fff;
    padding-top: 10px;
  }
  .left-top p{
    font-size: 15px;
    padding-top: 20px;
    color: rgba(100, 100, 100, .7);
  }
  .left-top ul div{
    height: 15px;
    margin-top: 25px;
    border: 1px solid rgba(100, 100, 100, .3);
  }
  /* ---------------- */
  .middle-left-bot{
    width: 100%;
    margin-left: 20px;
    display: flex;
  }
  .bot-left{
    width: 40%;
    height: 320px;
    background: chartreuse;
  }
  .bot-right{
    width: 60%;
    height: 320px;
    padding-right: 30px;
    padding-left: 10px;
  }
  .ul{
    width: 100%;
    height: 160px;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
  }
  .ul h5{
    margin-bottom: 0;
    padding-top: 5px;
    color: #fff;
  }
  .ul p{
    margin-bottom: 0;
  }
  .ul li{
    margin-right: 15px;
    flex: 1;
  }
  .middle-img img{
    width: 165px;
    height:100px;
    border-radius: 5px;
  } 

.right-top{
   display: flex;
   justify-content: space-evenly;
   padding-top: 10px;
 }
 .right-top-tit3{
   padding-top: 5px;
 }
 .right-bot-item li{
   width: 100%;
   height: 55px;
   display: flex;
 }
 .right-bot-item-left{
    width: 20%;
    height: 60px;
 }
 .right-bot-item-left-1{
    width: 60%;
    height: 60px;
 }
 .right-bot-item-left-1 h5{
   font: 18px;
   color: #fcfcfc;
 }
 .right-bot-item-right{
   width: 100%;
   display: flex;
   justify-content: space-between;
 }
 .right-bot-item-right p{
   color: #fff;
 }
 .right-bot-item-left h2{
    margin: 0 20px;
    color: crimson;
    font: 600 50px Impact;
 }
 h2{
   width: 30px;
   height: 60px;
   margin-bottom: 0;
 }
 .aaa img{
   width: 100%;
   height: 320px;
 }
</style>